package com.tracemap.websender.xmlparser;

import java.io.*;

import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;

import com.tracemap.websender.ResourceHelper;

public class XmlHelper {
    public static XmlPullParser loadData(String url) throws XmlPullParserException, IOException
    {
        String xmlData = ResourceHelper.loadManySerialized(url);

        XmlPullParserFactory parserFactory = XmlPullParserFactory.newInstance();
        XmlPullParser parser = parserFactory.newPullParser();
        parser.setInput(new StringReader(xmlData));

        return parser;
    }
}
